<template>
	<view>
		<uv-navbar
			:leftIconColor="navstyle.txtColor"
			:titleStyle="titleStyle"
			:title="navstyle.title"
			:leftIcon="navstyle.leftIcon"
			:bgColor="navstyle.bgColor"
			:fixed="false"
			@leftClick="leftClick"
			:safeAreaInsetTop="false">
		</uv-navbar>
		<view class="teamin" @click="fansClick">
			<image src="../../static/img/team/tubiao1.png" mode=""></image>
			<view class="information">
				<text>粉丝人数：</text>
				<text>{{teamData.fanscount}}</text>
			</view>
		</view>
		<view class="teamin" @click="teamClick">
			<image src="../../static/img/team/tubiao1.png" mode=""></image>
			<view class="information">
				<text>我的团队：</text>
				<text>{{teamData.teamcount}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {getMarket} from '@/api/team.js';
	export default{
		onLoad() {
			getMarket().then(response=>{
				this.teamData = response.data;
				console.log(this.teamData)
			});
			
		},
		data(){
			return{
				navstyle: {
					title: "我的市场",
					txtColor: "#333333",
					bgColor: "#FFFFFF",
					leftIcon: "arrow-left",
				},
				titleStyle: {
					fontWeight: 700
				},
				teamData:{}
			}
		},
		methods:{
			leftClick() {
				uni.reLaunch({
				  url: '/pages/index/index' // 替换成上一页的路径
				});
			},
			fansClick(){
				uni.redirectTo({
					url: '/pages/team/team_fu?type=1'
				});
			},
			teamClick(){
				uni.redirectTo({
					url: '/pages/team/team_fu?type=2'
				});
			}
		}
	}
	
</script>

<style>
	.teamin{
	    height: 150px;
	    background-size: 100% 95%;
	    background-repeat: no-repeat;
		background-image:url(../../static/img/team/shichang_bg.png) ;
	    display: flex;
	    align-items: center;
	    justify-content: flex-start;
	}
	.teamin image{
	    width: 40px;
	    height: 40px;
	    margin-left: 50px;
	    margin-right: 20px;
	}
	.information{
	    color: #fff;
		display: flex;
	}
</style>